package quick.frame.service.ui.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;

import quick.frame.core.base.fragment.BaseCompatFragment;
import quick.frame.service.R;
import quick.frame.service.ui.fragment.child.two.ReceiveChildFragment;

public class TwoParentFragemnt extends BaseCompatFragment {

    public static TwoParentFragemnt newInstance() {
        Bundle args = new Bundle();
        TwoParentFragemnt fragment = new TwoParentFragemnt();
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public int getLayoutId() {
        return R.layout.fragment_parent_template;
    }

    @Override
    public void initUI(View view, @Nullable Bundle savedInstanceState) {
        if (findChildFragment(ReceiveChildFragment.class) == null) {
            loadRootFragment(R.id.fl_container, ReceiveChildFragment.newInstance());
        }
      /*  if(view instanceof FrameLayout){
            FrameLayout frameLayout = (FrameLayout) view;
            TextView text = new TextView(getContext());
            text.setGravity(Gravity.CENTER);
            text.setText(" 第 二 个 Fragment");
            frameLayout.addView(text);
        }*/
    }
}
